package com.neusoft.elm.po;

import java.util.Objects;

public class Business {
    public Integer getBusinessId() {
        return businessId;
    }

    public void setBusinessId(Integer businessId) {
        this.businessId = businessId;
    }

    public String getBusinessName() {
        return businessName;
    }

    public void setBusinessName(String businessName) {
        this.businessName = businessName;
    }

    public String getBusinessAddress() {
        return businessAddress;
    }

    public void setBusinessAddress(String businessAddress) {
        this.businessAddress = businessAddress;
    }

    public String getBusinessExplain() {
        return businessExplain;
    }

    public void setBusinessExplain(String businessExplain) {
        this.businessExplain = businessExplain;
    }

    public String getBusinessImg() {
        return businessImg;
    }

    public void setBusinessImg(String businessImg) {
        this.businessImg = businessImg;
    }

    public Integer getOrderTypeId() {
        return orderTypeId;
    }

    public void setOrderTypeId(Integer orderTypeId) {
        this.orderTypeId = orderTypeId;
    }

    public double getStarPrice() {
        return starPrice;
    }

    public void setStarPrice(double starPrice) {
        this.starPrice = starPrice;
    }

    public double getDeliveryPrice() {
        return deliveryPrice;
    }

    public void setDeliveryPrice(double deliveryPrice) {
        this.deliveryPrice = deliveryPrice;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    private Integer businessId;
    private String businessName;
    private String businessAddress;
    private String businessExplain;
    private String businessImg;
    private Integer orderTypeId;
    private double starPrice;            //起送费
    private double deliveryPrice;        //配送费
    private String remarks;


public Business(){

}
public Business(int businessId, String businessName, String businessAddress
, String businessExplain, String businessImg, int orderTypeId, double starPrice
, double deliveryPrice, String remarks){
    this.businessAddress=businessAddress;
    this.businessExplain=businessExplain;
    this.businessId=businessId;
    this.businessImg=businessImg;
    this.businessName=businessName;
    this.deliveryPrice=deliveryPrice;
    this.orderTypeId=orderTypeId;
    this.remarks=remarks;
    this.starPrice=starPrice;

}

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Business bussiness = (Business) o;
        return Double.compare(bussiness.starPrice, starPrice) == 0 &&
                Double.compare(bussiness.deliveryPrice, deliveryPrice) == 0 &&
                Objects.equals(businessId, bussiness.businessId) &&
                Objects.equals(businessName, bussiness.businessName) &&
                Objects.equals(businessAddress, bussiness.businessAddress) &&
                Objects.equals(businessExplain, bussiness.businessExplain) &&
                Objects.equals(businessImg, bussiness.businessImg) &&
                Objects.equals(orderTypeId, bussiness.orderTypeId) &&
                Objects.equals(remarks, bussiness.remarks);
    }

    @Override
    public int hashCode() {
        return Objects.hash(businessId, businessName, businessAddress, businessExplain, businessImg, orderTypeId, starPrice, deliveryPrice, remarks);
    }

    @Override
    public String toString() {
        return "Bussiness{" +
                "businessId=" + businessId +
                ", businessName='" + businessName + '\'' +
                ", businessAddress='" + businessAddress + '\'' +
                ", businessExplain='" + businessExplain + '\'' +
                ", businessImg='" + businessImg + '\'' +
                ", orderTypeId=" + orderTypeId +
                ", starPrice=" + starPrice +
                ", deliveryPrice=" + deliveryPrice +
                ", remarks='" + remarks + '\'' +
                '}';
    }
}

